package file;

import java.io.*;

public class Demo11 {
    public static void main(String[] args) {
        try (Writer writer = new FileWriter("test2.txt")) {
            writer.write("hello world");
        }catch (IOException e) {
            e.printStackTrace();
        }
    }
}
